package net.dopan.pigframe.core.validator;

import net.dopan.pigframe.core.exception.RRException;
import org.apache.commons.lang.StringUtils;

/**
 * @Package: net.dopan.pigframe.core.validator
 * @Title: AbstractAssert
 * @Description: 数据校验
 * @author: 刘宽
 * @date: 2018/8/8 13:38
 */
public abstract class AbstractAssert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new RRException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new RRException(message);
        }
    }
}
